package com.syni.mdd.sjb.common.datatreaure.entity.vo.rp.minAppLogin;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class FastPhoneRpVo {
    private String assistantName;
    private Integer businessId;
    private String businessName;
    private String logoUrl;
    private Integer isHaveBusiness = 0;
    private Integer role = 2;
    private Integer isHaveVerPermission = 0;
    private List<BusinessData> businesses = new ArrayList<>();
    private String token;

    public static BuilderBusinessData newBuilderBusinessData() {
        return new BuilderBusinessData();
    }

    public static class BuilderBusinessData {
        private String businessName;
        private String logoUrl;
        private String addr;
        private String longitude;
        private String latitude;
        private Integer isHaveVerPermission = 0;
        private Integer businessId;
        public BuilderBusinessData setBusinessName(String businessName) {
            this.businessName = businessName;
            return this;
        }


        public BuilderBusinessData setLogoUrl(String logoUrl) {
            this.logoUrl = logoUrl;
            return this;
        }

        public BuilderBusinessData setAddr(String addr) {
            this.addr = addr;
            return this;
        }


        public BuilderBusinessData setLongitude(String longitude) {
            this.longitude = longitude;
            return this;
        }

        public BuilderBusinessData setLatitude(String latitude) {
            this.latitude = latitude;
            return this;
        }


        public BuilderBusinessData setIsHaveVerPermission(Integer isHaveVerPermission) {
            this.isHaveVerPermission = isHaveVerPermission;
            return this;
        }

        public BuilderBusinessData setBusinessId(Integer businessId) {
            this.businessId = businessId;
            return this;
        }

        public BusinessData build() {
            return new BusinessData(businessName,logoUrl,addr,longitude,latitude,isHaveVerPermission,businessId);
        }
    }

    public static class BusinessData{
        private String businessName;
        private String logoUrl;
        private String addr;
        @JsonIgnore
        private String longitude;
        @JsonIgnore
        private String latitude;
        private Integer isHaveVerPermission;
        private Integer businessId;

        public String getBusinessName() {
            return businessName;
        }

        public String getLogoUrl() {
            return logoUrl;
        }

        public String getAddr() {
            return addr;
        }

        public String getLongitude() {
            return longitude;
        }

        public String getLatitude() {
            return latitude;
        }

        public Integer getIsHaveVerPermission() {
            return isHaveVerPermission;
        }

        public Integer getBusinessId() {
            return businessId;
        }

        public BusinessData(String businessName, String logoUrl, String addr, String longitude, String latitude,
                            Integer isHaveVerPermission, Integer businessId) {
            this.businessName = businessName;
            this.logoUrl = logoUrl;
            this.addr = addr;
            this.longitude = longitude;
            this.latitude = latitude;
            this.isHaveVerPermission = isHaveVerPermission;
            this.businessId = businessId;
        }
    }

}
